package xin.sunzy.ssms.entity.po;

import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.List;

/**
 * 用户表
 */

@Alias("user")
public class User implements Serializable {

	private Long id;//用户id，77580000000+i	
	private String username;//用户名
	private String password;//密码	
	private String trueName;//真实姓名
	private String salt;//加密盐	
	private Long status;//用户状态  0:创建未认证（比如没有激活，没有输入验证码等等）--等待验证的用户 , 1:正常状态,2：用户被锁定. 	
	private Long phoneNum;
	private String email;	
	private Long gender;//性别，0：保密，1：男，2：女
    private List<Role> roleList;//角色列表

	public User() {}

    /** * 密码盐. * @return */
    public String getCredentialsSalt()  {
        return(this.username + this.salt);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getTrueName() {
        return trueName;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(Long phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Long getGender() {
        return gender;
    }

    public void setGender(Long gender) {
        this.gender = gender;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }


}